package protect18;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Oval sch=new Oval(sc.nextDouble(),sc.nextDouble());
        System.out.println("The area of "+sch.toString()+" is "+sch.area());
        System.out.println("The perimeterof "+sch.toString()+" is "+sch.perimeter());

    }
}
abstract class Shape
{
   final double PI=3.1415926;
    abstract double area();
    abstract double perimeter();

    public Shape() {
    }
}
class Oval extends Shape
{
    private double a;
    private double b;

    public Oval(double a, double b) {
        this.a = a;
        this.b = b;
    }

    public Oval() {
        a=0;
        b=0;
    }

    @Override
    double area() {
        double key;
        key=PI*a*b;
        return key;
    }

    @Override
    double perimeter() {
        double key;
        key=2*PI* Math.sqrt((a*a+b*b)/2);
        return key;
    }
    public String toString()
    {
       return "Oval(a:"+String.valueOf(a)+",b:"+String.valueOf(b)+")";
    }
}